package service

import (
	db "configuration/database"
	"github.com/garyburd/redigo/redis"
)

func CacheGet(key string) (value string, err error) {
	value, err = redis.String(db.RedisConn.Do("GET", key))
	return
}

func CacheSet(key string, value string) (err error) {
	_, err = db.RedisConn.Do("SET", key, value)
	return
}

func CacheDel(key string) (err error) {
	_, err = db.RedisConn.Do("DEL", key)
	return
}
